<style>
  .paypal-list-box{
    width: 100%;display: flex;flex-direction: column;
  }
  .paypal-list-box>div{
    margin-top: 15px;
  }
  .paypal-list-box>div:first-child{
    margin-top: 0 !important;
  }
</style>


{% if payment.interface_type_param.exp_funding_allowed_list and payment.interface_type_param.exp_funding_allowed_list.size > 0 %}
  {% assign enable_funding = payment.interface_type_param.exp_funding_allowed_list | join: "," %}
{% endif %}

{% if payment.interface_type_param.exp_funding_disallowed_list and payment.interface_type_param.exp_funding_disallowed_list.size > 0 %}
  {% assign disable_funding = payment.interface_type_param.exp_funding_disallowed_list | join: "," %}
{% endif %}

<script
src="https://www.paypal.com/sdk/js?components=buttons,messages,card-fields,applepay,googlepay&client-id={% if payment.interface_type != "paypalcompletepaymentsv2" %}{{payment.apiInfo.client_id}}{% else %}{{payment.interface_type_param.client_id}}{% endif %}{% if payment.interface_type != "paypalcompletepaymentsv2" %}&merchant-id={{payment.interface_type_param.merchant_id}}{% endif %}&commit=true&currency={{ currency.standard_code }}{% if payment.interface_type_param.authorize_payment == 1 %}&intent=authorize{% endif %}{% if enable_funding %}&enable-funding={{enable_funding}}{% endif %}{% if disable_funding %}&disable-funding={{disable_funding}}{% endif %}"></script>

<div class="paypal-list-box" style="width: 100%;display: flex;flex-direction: column;">

  {% for payMethod in payment.interface_type_param.payMethod %}
      {% if payMethod == 'paypal' %}
        {% include 'paypal_adspay', pay_id:pay_id %}
      {% endif %}
      {% if payMethod == 'google' %}
        {% include 'paypal_goolepay', pay_id:pay_id %}
      {% endif %}
      {% if payMethod == 'apple' %}
        {% include 'paypal_applepay', pay_id:pay_id %}
      {% endif %}
  {% endfor %}
</div>